package com.junxonline.instant.dao.entity.model.log;

import com.alibaba.fastjson.annotation.JSONField;
import com.alibaba.fastjson.serializer.ToStringSerializer;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 系统登录日志表实体类
 *
 * @author JunX
 * @date 2021-07-13
 */
@Data
@TableName(value = "sys_log_login")
public class LogLogin implements Serializable {

    /**
     * ID
     */
    @TableId(type = IdType.AUTO)
    @JSONField(serializeUsing = ToStringSerializer.class)
    private Long id;

    /**
     * 用户名
     */
    @TableField(value = "username")
    private String username;

    /**
     * token
     */
    @TableField(value = "token")
    private String token;

    /**
     * 操作类型
     */
    @TableField(value = "type")
    @JSONField(serializeUsing = ToStringSerializer.class)
    private Integer type;

    /**
     * 用户IP
     */
    @TableField(value = "user_ip")
    private String userIp;

    /**
     * 目标系统IP
     */
    @TableField(value = "target_ip")
    private String targetIp;

    /**
     * 浏览器
     */
    @TableField(value = "browser")
    private String browser;

    /**
     * 操作系统
     */
    @TableField(value = "os")
    private String os;

    /**
     * 操作时间
     */
    @TableField(value = "operation_time")
    private Date operationTime;

}
